home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
BBS
/
MUBBS
/
MUBBS etc.cpt
/
Module Source
/
Module std routines
/
MUBBS Lock.c
next >
Wrap
Text File
|
1991-11-02
|
1KB
|
32 lines
/* This is the same code as in the think C libraries, it's just
shorter this way so that you don't have to include all the MacTraps
routines if you don't want to. (just to get this few lines of code
would be a MAJOR waste!)
If you do include MacTraps for some reason, you need to remove this
file from your project. (or add code to it!)
I urge you to conserve memory and NOT to just include files when
you really don't have to.
*/
HLock(){
asm{
movea.l (A7)+,A1 /* pull return address off stack put it in A1 */
movea.l (A7)+,A0 /* pull "handle" and put in into A0 */
_HLock
move.l A1,-(A7) /* put the return address back so we can return */
move.w d0,0x0220 /* put any error into global "MemErr" */
}
}
HUnlock(){
asm{
movea.l (A7)+,A1 /* pull return address off stack put it in A1 */
movea.l (A7)+,A0 /* pull "handle" and put in into A0 */
_HUnlock
move.l A1,-(A7) /* put the return address back so we can return */
move.w d0,0x0220 /* put any error into global "MemErr" */
}
}